<template>
	<!-- <view class="content">
		<view style="background-color: #FFF;height: 80rpx;margin-top: 16rpx;display: flex;flex-direction: row;align-items: center;justify-content: space-between">
			<view style="margin-left: 30rpx;">已入驻商家数：{{shopCount}}</view>
			<view @click="itemHandle"
				style="width: 160rpx;height: 60rpx;margin-left: 20rpx;margin-right:30rpx;display: flex;flex-direction: row;align-items: center;justify-content: center;font-size: 28rpx;border-radius: 4rpx;border: 1rpx solid #DD4949;color: #DD4949;">
				免费入驻
			</view>
		</view>
	</view> -->
	
	<view style="display: flex;flex-direction: row;flex-wrap: wrap;align-content: flex-start;"
	:style="{
	    'background': nodeModel.configDict.componentStyle.background,
		'marginTop': nodeModel.configDict.componentStyle.marginTop+'rpx',
		'marginBottom': nodeModel.configDict.componentStyle.marginBottom+'rpx',
		'marginLeft': nodeModel.configDict.componentStyle.marginLeft+'rpx',
		'marginRight': nodeModel.configDict.componentStyle.marginLeft+'rpx',
		'paddingTop': nodeModel.configDict.componentStyle.paddingTop+'rpx',
		'paddingBottom': nodeModel.configDict.componentStyle.paddingBottom+'rpx',
		'paddingLeft': nodeModel.configDict.componentStyle.paddingLeft+'rpx',
		'paddingRight': nodeModel.configDict.componentStyle.paddingLeft+'rpx'
		}">
		<view style="display: flex;"
		:style="{
			'width': nodeModel.configDict.componentStyle.widthForFlex1+'rpx',
			'flex-direction': nodeModel.configDict.componentStyle.flex_directionForFlex1,
			'align-items': nodeModel.configDict.componentStyle.align_itemsForFlex1,
			'justify-content': nodeModel.configDict.componentStyle.justify_contentForFlex1,
			'background': nodeModel.configDict.componentStyle.backgroundForFlex1,
			'marginLeft': nodeModel.configDict.componentStyle.marginLeftForFlex1+'rpx',
			'paddingTop': nodeModel.configDict.componentStyle.paddingTopForFlex1+'rpx',
			'paddingBottom': nodeModel.configDict.componentStyle.paddingBottomForFlex1+'rpx',
			'paddingLeft': nodeModel.configDict.componentStyle.paddingLeftForFlex1+'rpx',
			'paddingRight': nodeModel.configDict.componentStyle.paddingLeftForFlex1+'rpx'
		}">

			<view v-if="nodeModel.configDict.componentStyle.isShowForText1 && nodeModel.configDict.componentStyle.titleForText1" :style="{
				'marginTop': nodeModel.configDict.componentStyle.marginTopForText1+'rpx',
				'color': nodeModel.configDict.componentStyle.colorForText1,
				'font-size': nodeModel.configDict.componentStyle.fontsizeForText1 + 'rpx',
				'font-weight': nodeModel.configDict.componentStyle.fontweightForText1,
			}">{{nodeModel.configDict.componentStyle.titleForText1}}{{formData.shopCount}}</view>
			<view @click="itemHandle" style="text-align: center;" :style="{
				'width': nodeModel.configDict.componentStyle.widthForBtn1 + 'rpx',
				'height': nodeModel.configDict.componentStyle.heightForBtn1 + 'rpx',
				'line-height': nodeModel.configDict.componentStyle.heightForBtn1 + 'rpx',
				'color': nodeModel.configDict.componentStyle.colorForBtn1,
				'background': nodeModel.configDict.componentStyle.backgroundColorForBtn1,
				'border': nodeModel.configDict.componentStyle.borderColorForBtn1 + ' solid 1rpx',
				'border-radius': nodeModel.configDict.componentStyle.borderRadiusForBtn1 + 'rpx',
				'font-size': nodeModel.configDict.componentStyle.fontsizeForBtn1 + 'rpx',
				'font-weight': nodeModel.configDict.componentStyle.fontweightForBtn1,
				'margin-right': nodeModel.configDict.componentStyle.marginRightForBtn1 + 'rpx'
			}">{{nodeModel.configDict.componentStyle.titleForBtn1}}</view>
		</view>
	</view>
</template>

<script>
	import { lessee } from '@/api/lessee.js'
	export default{
		components: {},
		props:{
			nodeModel: {
				type: Object,
				default: {}
			},
			shopCount: {
				type: Number,
				default: 0
			},
		},
		data() {
			return {
				formData: {}
			}
		},
		created() {
			this.lesseeData()
		},
		methods:{
			loadData(){
				this.lesseeData()
			},
			itemHandle(){
				this.$emit('itemHandle', {query: this.nodeModel.configDict.componentStyle.query})
			},
			lesseeData() {
				lessee.lesseeData({
					lesseeId: this.$store.getters.getLessee
				}).then(res => {
					if (res.data.code == 10000) {
						this.formData = res.data.data
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	
</style>
